#ifndef WIDGET_BEGIN_H
#define WIDGET_BEGIN_H



#include "players.h"
#include "gui.h"
#include <sstream>
#include <QtGui>
#include <QObject>



//! @brief Class representating line with added player info
class added_player:public QWidget
{

public:

	/** @brief Constructor creates the line with information - id, name, type, color
	*	@param pl added player, constraint: pl != 0
	*	@param parent Qt parent
	*	@param flags Qt flags
	*/
	added_player( player* pl, QWidget* parent = 0, Qt::WindowFlags flags = 0 );

};



//! @brief Gui class for adding players and setting begin parameters
class begin_widget: public QWidget
{

	Q_OBJECT

public:

	/** @brief Creates part of the gui
	*	@param parent Qt parent
	*	@param flags Qt flags
	*/
	begin_widget( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
	

private:

	//! widget layout
	QVBoxLayout* layout;
	//! input field for map filename
	QLineEdit* name_i;
	//! radio button for local game type
	QRadioButton* local_rb;
	//! radio button for network game type
	QRadioButton* network_rb;
	//! input field for player's type
	QComboBox* type_i;
	//! add new player button
	QPushButton* add_b;
	//! next button - can be pressed when there are at least 2 players added
	QPushButton* next_b;
	

private slots:

	//! @brief Qt slot that adds new player
	void add_player();
	//! @brief Qt slot that jumps to buy screen
	void next();

};



#endif